import request from '@/utils/request'
//差选枚举
export function queryEnumList() {
  return request({
    url: '/fish/base/enum/queryList',
    method: 'get'
  })
}
//查询设施组
export function queryFacilityGroup(data = {}) {
  return request({
    url: `/v3/facility/facilityGroup/queryByCondition`,
    method: 'post',
    data: {
      organizationNo: sessionStorage.organizationNo,
      groupStatus: false,
      systemNo: sessionStorage.systemNo,
      farmingTypeNo: sessionStorage.farmingTypeNo||'sc',
    }
  })
}
//查询设施类型
export function queryFacilityType() {
  const url = `/v3/facility/facilityType/queryByCondition`
  return request({
    url: url,
    method: 'post',
    data: {
      organizationNo: sessionStorage.organizationNo,
      systemNo: sessionStorage.systemNo,
      farmingTypeNo: sessionStorage.farmingTypeNo||'sc',
    }
  })
}
//查询规格
export function querySpec(data = {}) {
  return request({
    url: '/fish/base/spec/queryByCondition',
    method: 'post',
    data
  })
}
//查询员工
export function personDepartmentMapper(data = {}) {
  return request({
    url: '/v3/organization/personDepartmentMapper/queryByCondition',
    method: 'post',
    data
  })
}

//查询仓库
export function stordoc(data = {}) {
  return request({
    url: '/v3/inventory/stordoc/queryByCondition',
    method: 'post',
    data:{
      ...data,
      systemNo:sessionStorage.systemNo
    }
  })
}
//查询所有设施
export function queryAllFacilityDetail() {
  return request({
    url: `/v3/facility/facility/queryAllFacilityDetail?systemNo=${sessionStorage.systemNo}&farmingTypeNo=${sessionStorage.farmingTypeNo||'sc'}`,
    method: 'get'
  })
}
//组织位置
export function queryOrganizationInfo() {
  return request({
    url: `v3/organization/organizationInfo/queryByOrganizationNo?no=${sessionStorage.organizationNo}`,
    method: 'get'
  })
}
//承租户
export function queryLessesByCondition(e) {
  return request({
    url: `v3/lessee/lessee/queryByCondition`,
    method: 'post',
    data: {
      organizationNo: sessionStorage.organizationNo,
      contactStatus: e
    }
  })
}